package models

import (
	"github.com/astaxie/beego/orm"
)

type AlarmrecordInfo struct {
	Id int64
	Deviceid string
	Devicetype string
	Company  string
	Alarmtype string
	Alarmstamp int64
	Alarmtime string
}

//新增一条告警记录
func AddAlarm(alarmrecord_info *AlarmrecordInfo)(int64,error){
	db := orm.NewOrm()
	id,err := db.Insert(alarmrecord_info)
	return id,err
}